package com.moon.feign;

import com.github.pagehelper.PageInfo;
import com.moon.dto.TProduct;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient("moon-service-gateway")
public interface ProductFeign {

    @RequestMapping("/moon-service-auction/product/insert")
    String insert(@RequestBody TProduct product);
    @RequestMapping("/moon-service-auction/product/selectAll")
    PageInfo<TProduct> selectAll(@RequestParam("currentPage") Integer currentPage, @RequestParam("pageSize") Integer pageSize);

    @RequestMapping("/moon-service-auction/product/delete")
    String delete(@RequestParam("productId") long productId);

    @RequestMapping("/moon-service-auction/product/update")
    String update(@RequestBody TProduct product);


}
